//
//  ComposeTextView.swift
//  Weibo
//
//  Created by 孙国强 on 2017/7/5.
//  Copyright © 2017年 孙国强. All rights reserved.
//

import UIKit

class ComposeTextView: UITextView {
    // MARK:- 懒加载属性
    lazy var placeHolderLabel : UILabel = UILabel()
    
    // MARK:- 构造函数
    required init?(coder aDecoder: NSCoder) {
        super.init(coder: aDecoder)
        
        setupUI()
    }
}

extension ComposeTextView {
    fileprivate func setupUI() {
        addSubview(placeHolderLabel)
        
        placeHolderLabel.snp.makeConstraints { (make) in
            make.top.equalTo(7)
            make.left.equalTo(11)
        }
        
        placeHolderLabel.textColor = UIColor.lightGray
        placeHolderLabel.font = font
        
        placeHolderLabel.text = "分享新鲜事"
        
        textContainerInset = UIEdgeInsetsMake(7, 7, 0, 7)
    }
}
